﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HelloMVC.Interface.Repository;
using HelloMVC.Model;

namespace HelloMVC.Repository
{
    public class AccountRepository : IAccountRepository
    {
        /// <summary>
        /// Get All Users
        /// </summary>
        /// <returns></returns>
        public IList<UserModel> GetAllUsers()
        {
            return Mapper.Instance().QueryForList<UserModel>("GetAllUsers", null);
        }

        /// <summary>
        /// Get User detail
        /// </summary>
        /// <param name="PKID">Primary ID user you want to query</param>
        /// <returns></returns>
        public UserDetailModel GetUserDetail(String PKID)
        {
            return Mapper.Instance().QueryForObject<UserDetailModel>("GetUserDetail", PKID);
        }
    }
}
